package com.rediscolony.service.impl;

import com.rediscolony.service.RedisClusterService;
import jakarta.annotation.Resource;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

@Service
public class RedisClusterServiceImpl implements RedisClusterService {
	@Resource
	private RedisTemplate<String,String> redisTemplate;
	@Override
	public String set(String key, String value) {
		redisTemplate.opsForValue().set(key, value);
		return key;
	}

	@Override
	public String get(String key) {
		return redisTemplate.opsForValue().get(key);
	}
}
